<?php
/**
 * 假数据生成.
 * User: Yoby logove@qq.com
 * Date: 2019/5/24 16:56
 * wechat: logove
 include_once("Mock.php");
$m = new Mock\Mock();
echo $m->string(12)."<br>";//随机字符数
echo $m->number(10)."<br>";//随机数字
echo $m->number('10000-99999')."<br>";
echo $m->name()."<br>";//名字 0随机 1男 2女
echo $m->price(1,10)."<br>";//价格,可不填默认0.01-100
echo $m->datetime()."<br>";
echo $m->date()."<br>";
echo $m->time()."<br>";
echo $m->timestamp()."<br>";//随即时间戳 now参数是现在时间戳
echo $m->color()."<br>";//随机颜色
echo $m->url()."<br>";//
echo $m->email()."<br>";//
echo $m->mobile()."<br>";//
echo $m->bank()."<br>";//银行
echo $m->country()."<br>";//国家
echo $m->province()."<br>";//省份
echo $m->city()."<br>";//城市
echo $m->city('code')."<br>";//邮编
echo $m->ip()."<br>";//
echo $m->id_card()."<br>";//身份证
echo $m->image(640,480,'cats')."<br>";//支持的分类 'cats', 'city', 'food', 'nightlife','fashion', 'people', 'nature', 'sports'
echo $m->address()."<br>";//地址
echo $m->company()."<br>";//公司名
echo $m->ad()."<br>";//广告语
echo $m->title()."<br>";//标题
echo $m->uuid()."<br>";//uuid
echo $m->emoji()."<br>";//emoji
echo $m->md5()."<br>";
echo $m->sha1()."<br>";
 */
namespace Mock;

class Mock {

    public $name;
    public $rule;
    public $value;

    /**
     * 随机字符串
     * @param $rule
     * @param $value
     * @return bool|string
     */
    public function string($rule, $value='')
    {

        $chars  = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ23456789';

        $value = $value ? $value : $chars;

        $string = '';

        if(false !== strpos($rule, '-')){

            list($min, $max) = explode('-', $rule);

            $max = $max > strlen($value) ? strlen($value)-1 : $max;

            return substr(str_shuffle($value),0, mt_rand($min, $max));

        }

        if(is_numeric($rule)){

            for ( $i = 0; $i < $rule; $i++ ){

                $string .= $value[mt_rand(0, strlen($value) - 1)];

            }

            return $string;

        }

    }

    /**
     * 随机数字
     * @param $rule
     * @return int|string
     */
    public function number($rule,$value='')
    {

        $numbers  = '0123456789';

        $value = $value ? $value : $numbers;

        if(false !== strpos($rule, '-')){

            list($min, $max) = explode('-', $rule);

            return mt_rand($min, $max);

        }

        if(is_numeric($rule)){

            $number = '';

            for ( $i = 0; $i < $rule; $i++ ){
                $number .= $value[mt_rand(0, strlen($value) - 1)];

            }

            return $number;

        }

    }

    /**
     * 随机中文名
     * @return string
     */
    public function name($sex='0')
    {
$x = [
    '李','王','张','刘','陈','杨','赵','黄','周','吴',
    '徐','孙','胡','朱','高','林','何','郭','马','罗',
    '梁','宋','郑','谢','韩','唐','冯','于','董','萧',
    '程','曹','袁','邓','许','傅','沉','曾','彭','吕',
    '苏','卢','蒋','蔡','贾','丁','林','薛','叶','阎',
    '余','潘','杜','戴','夏','钟','汪','田','任','姜',
    '范','方','石','姚','谭','廖','邹','熊','金','陆',
    '郝','孔','白','崔','康','毛','邱','秦','江','史',
    '顾','侯','邵','孟','龙','万','段','雷','钱','汤',
    '尹','黎','易','常','武','乔','贺','赖','龚','文',
    '庞','樊','兰','殷','施','陶','洪','翟','安','颜',
    '倪','严','牛','温','芦','季','俞','章','鲁','葛',
    '伍','韦','申','尤','毕','聂','丛','焦','向','柳',
    '邢','路','岳','齐','沿','梅','莫','庄','辛','管',
    '祝','左','涂','谷','祁','时','舒','耿','牟','卜',
    '路','詹','关','苗','凌','费','纪','靳','盛','童',
    '欧','甄','项','曲','成','游','阳','裴','席','卫',
    '查','屈','鲍','位','覃','霍','翁','隋','植','甘',
    '景','薄','单','包','司','柏','宁','柯','阮','桂',
    '闵','欧阳','解','强','柴','华','车','冉','房','边',
    '辜','吉','饶','刁','瞿','戚','丘','古','米','池',
    '滕','晋','苑','邬','臧','畅','宫','来','嵺','苟',
    '全','褚','廉','简','娄','盖','符','奚','木','穆',
    '党','燕','郎','邸','冀','谈','姬','屠','连','郜',
    '晏','栾','郁','商','蒙','计','喻','揭','窦','迟',
    '宇','敖','糜','鄢','冷','卓','花','仇','艾','蓝',
    '都','巩','稽','井','练','仲','乐','虞','卞','封',
    '竺','冼','原','官','衣','楚','佟','栗','匡','宗',
    '应','台','巫','鞠','僧','桑','荆','谌','银','扬',
    '明','沙','薄','伏','岑','习','胥','保','和','蔺',
];
$b = ['伟','强','磊','洋','勇','军','杰','涛','超','明',
    '刚','平','辉','鹏','华','飞','鑫','波','斌','宇',
    '浩','凯','健','俊','帆','帅','旭','宁','龙','林',
    '欢','阳','建华','亮','成','畅','建','峰','建国','建军',
    '晨','瑞','志强','兵','雷','东','欣','博','彬','坤',
    '全安','荣','岩','杨','文','利','楠','建平','嘉俊','晧',
    '建明','子安','新华','鹏程','学明','博涛','捷','文彬','楼','鹰',
    '松','伦','超','钟','瑜','振国','洪','毅','昱然','哲',
    '翔','翼','祥','国庆','哲彦','正诚','正豪','正平','正业','志诚',
    '志新','志勇','志明','志强','志文','致远','智明','智勇','智敏','智渊',];
$g = ['芳','娜','敏','静','敏静','秀英','丽','洋','艳','娟',
    '文娟','君','文君','珺','霞','明霞','秀兰','燕','芬','桂芬',
    '玲','桂英','丹','萍','华','红','玉兰','桂兰','英','梅',
    '莉','秀珍','雪','依琳','旭','宁','婷','馨予','玉珍','凤英',
    '晶','欢','玉英','颖','红梅','佳','倩','琴','兰英','云',
    '洁','爱华','淑珍','春梅','海燕','晨','冬梅','秀荣','瑞','桂珍',
    '莹','秀云','桂荣','秀梅','丽娟','婷婷','玉华','琳','雪梅','淑兰',
    '丽丽','玉','秀芳','欣','淑英','桂芳','丽华','丹丹','桂香','淑华',
    '秀华','桂芝','小红','金凤','文','利','楠','红霞','瑜','桂花',
    '璐','凤兰','腊梅','瑶','嘉','怡','冰冰','玉梅','慧','婕',];
$s = array_merge($b,$g);

$k = array_rand($x, 1);
        $k1 = array_rand($b, 1);
        $k2 = array_rand($g, 1);
        $k0 = array_rand($s, 1);


        if(0==$sex){
            $str = $x[$k].$s[$k0];
        }elseif(1==$sex){
            $str = $x[$k].$b[$k1];
        }elseif (2==$sex){
            $str = $x[$k].$g[$k2];
        }
        return $str;
    }

    /**
     * 随机价格
     * @param $rule 整数范围
     * @param int $decimal 精度
     * @return string
     */
    public function price($min='0.01',$max='100.00')
    {

        return sprintf("%.2f",$min + mt_rand() / mt_getrandmax() * ($max - $min));

    }

    /**
     * 随机日期时间
     * @param string $format
     * @return false|string
     */
    public function datetime($format = 'Y-m-d H:i:s')
    {

        return date($format,self::timestamp());

    }
    public function date($format = 'Y-m-d')
    {

        return date($format,self::timestamp());

    } public function time($format = 'H:i:s')
{

    return date($format,self::timestamp());

}
public function timestamp($is=''){//随即时间戳
    $begin = strtotime("1970-12-12 12:12:12");
    $end = time();
    if($is=='now'){
        return $end;
    }else{
        return $timestamp = rand($begin, $end);
    }

}
    /**
     * 随机颜色
     * @param string $format 颜色格式
     * @return string
     */
    public function color($format = 'hex')
    {

        $colors = array();

        for($i = 0;$i<6;$i++){
            $colors[] = dechex(rand(0,15));
        }

        $hex = '#'.implode('',$colors);

        switch ($format) {

            case 'hex':

                return $hex;

                break;

            case 'rgb':

                return $this->hex2rgb($hex);

                break;

        }

    }

    /**
     * 随机网址
     * @param $protocol
     * @param $domain
     * @param array $suffix
     * @return string
     */
    public function url($protocol='',$domain='')
    {

        if(!$protocol){

            $data = array('http', 'https');

            $protocol = $data[array_rand($data, 1)];
        }

        if(!$domain){

            $data = array('www.baidu.com', 'www.qq.com', 'www.taobao.com','www.csdn.net','www.yoby123.cn');

            $domain  = $data[array_rand($data, 1)];

        }

        return $protocol .'://' . $domain;

    }

    /**
     * 随机邮箱
     * @return string
     */
    public function email()
    {

        $data = array(
            '@qq.com','@163.com','@126.com','@sina.com.cn','@139.com','@hotmail.com','@gmail.com','@yahoo.com'
        );

        $domain = $data[mt_rand(0, count($data) - 1)];

        if($domain == '@qq.com'){

            return $this->number('10000-1000000000') . $domain;

        }

        return $this->string(6) . $domain;

    }

    /**
     * 随机手机号
     * @return string
     */
    public function mobile()
    {

        $data = array(
            130,131,132,133,134,135,136,137,138,139,144,147,150,151,152,153,155,156,157,158,159,176,177,178,180,181,182,183,184,185,186,187,188,189,
        );

        $prefix = $data[mt_rand(0, count($data) - 1)];

        return $prefix . $this->number('10000000-99999999');

    }

    /**
     * 随机银行
     * @param string $format
     * @return mixed
     */
    public function bank()
    {

        $data =[     '渤海银行',
            '广发银行',
            '国家开发银行',
            '恒丰银行',
            '华夏银行',
            '交通银行',
            '平安银行',
            '上海浦东发展银行',
            '兴业银行',
            '招商银行',
            '浙商银行',
            '中国工商银行',
            '中国光大银行',
            '中国建设银行',
            '中国民生银行',
            '中国农业银行',
            '中国银行',
            '中国邮政储蓄银行',
            '中信银行'];

        $key = array_rand($data, 1);

            return $data[$key];


    }

    /**
     * 随机国家
     * @param string $format
     * @return mixed
     */
    public function country($format = 'title')
    {

        $data = [ '阿富汗', '阿拉斯加', '阿尔巴尼亚', '阿尔及利亚',
            '安道尔', '安哥拉', '安圭拉岛英', '安提瓜和巴布达',
            '阿根廷', '亚美尼亚', '阿鲁巴岛', '阿森松', '澳大利亚',
            '奥地利', '阿塞拜疆', '巴林', '孟加拉国', '巴巴多斯',
            '白俄罗斯', '比利时', '伯利兹', '贝宁', '百慕大群岛',
            '不丹', '玻利维亚', '波斯尼亚和黑塞哥维那', '博茨瓦纳',
            '巴西', '保加利亚', '布基纳法索', '布隆迪', '喀麦隆',
            '加拿大', '加那利群岛', '佛得角', '开曼群岛', '中非',
            '乍得', '智利', '圣诞岛', '科科斯岛', '哥伦比亚',
            '巴哈马国', '多米尼克国', '科摩罗', '刚果', '科克群岛',
            '哥斯达黎加', '克罗地亚', '古巴', '塞浦路斯', '捷克',
            '丹麦', '迪戈加西亚岛', '吉布提', '多米尼加共和国',
            '厄瓜多尔', '埃及', '萨尔瓦多', '赤道几内亚',
            '厄立特里亚', '爱沙尼亚', '埃塞俄比亚', '福克兰群岛',
            '法罗群岛', '斐济', '芬兰', '法国', '法属圭亚那',
            '法属波里尼西亚', '加蓬', '冈比亚', '格鲁吉亚', '德国',
            '加纳', '直布罗陀', '希腊', '格陵兰岛', '格林纳达',
            '瓜德罗普岛', '关岛', '危地马拉', '几内亚', '几内亚比绍',
            '圭亚那', '海地', '夏威夷', '洪都拉斯', '匈牙利', '冰岛',
            '印度', '印度尼西亚', '伊郎', '伊拉克', '爱尔兰', '以色列',
            '意大利', '科特迪瓦', '牙买加', '日本', '约旦', '柬埔塞',
            '哈萨克斯坦', '肯尼亚', '基里巴斯', '朝鲜', '韩国', '科威特',
            '吉尔吉斯斯坦', '老挝', '拉脱维亚', '黎巴嫩', '莱索托',
            '利比里亚', '利比亚', '列支敦士登', '立陶宛', '卢森堡',
            '马其顿', '马达加斯加', '马拉维', '马来西亚', '马尔代夫',
            '马里', '马耳他', '马里亚纳群岛', '马绍尔群岛', '马提尼克',
            '毛里塔尼亚', '毛里求斯', '马约特岛', '墨西哥', '密克罗尼西亚',
            '中途岛', '摩尔多瓦', '摩纳哥', '蒙古', '蒙特塞拉特岛',
            '摩洛哥', '莫桑比克', '缅甸', '纳米比亚', '瑙鲁', '尼泊尔',
            '荷兰', '荷属安的列斯群岛', '新喀里多尼亚群岛', '新西兰',
            '尼加拉瓜', '尼日尔', '尼日利亚', '纽埃岛', '诺福克岛',
            '挪威', '阿曼', '帕劳', '巴拿马', '巴布亚新几内亚', '巴拉圭',
            '秘鲁', '菲律宾', '波兰', '葡萄牙', '巴基斯坦', '波多黎各',
            '卡塔尔', '留尼汪岛', '罗马尼亚', '俄罗斯', '卢旺达',
            '东萨摩亚', '西萨摩亚', '圣马力诺', '圣皮埃尔岛及密克隆岛',
            '圣多美和普林西比', '沙特阿拉伯', '塞内加尔', '塞舌尔',
            '新加坡', '斯洛伐克', '斯洛文尼亚', '所罗门群岛', '索马里',
            '南非', '西班牙', '斯里兰卡', '圣克里斯托弗和尼维斯',
            '圣赫勒拿', '圣卢西亚', '圣文森特岛', '苏丹', '苏里南',
            '斯威士兰', '瑞典', '瑞士', '叙利亚', '塔吉克斯坦', '坦桑尼亚',
            '泰国', '阿拉伯联合酋长国', '多哥', '托克劳群岛', '汤加',
            '特立尼达和多巴哥', '突尼斯', '土耳其', '土库曼斯坦',
            '特克斯和凯科斯群岛(', '图瓦卢', '美国', '乌干达', '乌克兰',
            '英国', '乌拉圭', '乌兹别克斯坦', '瓦努阿图', '梵蒂冈',
            '委内瑞拉', '越南', '维尔京群岛', '维尔京群岛和圣罗克伊',
            '威克岛', '瓦里斯和富士那群岛', '西撒哈拉', '也门', '南斯拉夫',
            '扎伊尔', '赞比亚', '桑给巴尔', '津巴布韦', '中华人民共和国', '中国'];
        $key = array_rand($data, 1);
return $data[$key];

    }

    /**
     * 随机省份
     * @param string $format
     * @return mixed
     */
    public function province()
    {
        $data = [ '北京市', '天津市', '河北省', '山西省',
            '内蒙古自治区', '辽宁省', '吉林省',
            '黑龙江省', '上海市', '江苏省',
            '浙江省', '安徽省', '福建省', '江西省',
            '山东省', '河南省', '湖北省', '湖南省',
            '广东省', '广西壮族自治区', '海南省',
            '重庆市', '四川省', '贵州省', '云南省',
            '西藏自治区', '陕西省', '甘肃省', '青海省',
            '宁夏回族自治区', '新疆维吾尔自治区',
            '香港特别行政区', '澳门特别行政区', '台湾省'];

        $key = array_rand($data, 1);
            return $data[$key];
    }

    /**
     * 随机城市
     * @param string $format
     * @return mixed
     */
    public function city($format = 'title')
    {
        $data = array(
            '110100' => '北京市',
            '120100' => '天津市',
            '130100' => '石家庄市',
            '140100' => '太原市',
            '150100' => '呼和浩特市',
            '210100' => '沈阳市',
            '230100' => '哈尔滨市',
            '310100' => '上海市',
            '220100' => '长春市',
            '320100' => '南京市',
            '330100' => '杭州市',
            '340100' => '合肥市',
            '350100' => '福州市',
            '360100' => '南昌市',
            '370100' => '济南市',
            '410100' => '郑州市',
            '420100' => '武汉市',
            '430100' => '长沙市',
            '440100' => '广州市',
            '450100' => '南宁市',
            '460100' => '海口市',
            '500100' => '重庆市',
            '510100' => '成都市',
            '520100' => '贵阳市',
            '530100' => '昆明市',
            '540100' => '拉萨市',
            '610100' => '西安市',
            '620100' => '兰州市',
            '640000' => '西宁市',
            '640100' => '银川市',
            '650100' => '乌鲁木齐市',
        );

        $key = array_rand($data, 1);

        if($format == 'code'){

            return $key;

        }elseif ($format == 'title'){

            return $data[$key];

        }

    }

    /**
     * 随机IP(v4)
     * @return string
     */
    public function ip()
    {

        return $this->get_rand_ip();
    }

    /**
     * 随机中国大陆身份证
     * @return string
     */
    public function id_card()
    {

        return $this->get_rand_id_card();
    }

    /**
     * 随机图片
     */
    public function image($width=640,$height=480,$type='nature')
    {
        $baseUrl = "https://lorempixel.com/";
        $arr = ['cats', 'city', 'food', 'nightlife',
            'fashion', 'people', 'nature', 'sports'];
        if (!in_array($type, $arr)) {
            $type='nature';
        }

        return $baseUrl."$width/$height/$type/?".$this->number(5);

    }


    /**
     * 获取随机ip
     * @return string
     */
    private function get_rand_ip(){

        $ip_long = array(
            array('607649792', '608174079'), //36.56.0.0-36.63.255.255
            array('975044608', '977272831'), //58.30.0.0-58.63.255.255
            array('999751680', '999784447'), //59.151.0.0-59.151.127.255
            array('1019346944', '1019478015'), //60.194.0.0-60.195.255.255
            array('1038614528', '1039007743'), //61.232.0.0-61.237.255.255
            array('1783627776', '1784676351'), //106.80.0.0-106.95.255.255
            array('1947009024', '1947074559'), //116.13.0.0-116.13.255.255
            array('1987051520', '1988034559'), //118.112.0.0-118.126.255.255
            array('2035023872', '2035154943'), //121.76.0.0-121.77.255.255
            array('2078801920', '2079064063'), //123.232.0.0-123.235.255.255
            array('-1950089216', '-1948778497'), //139.196.0.0-139.215.255.255
            array('-1425539072', '-1425014785'), //171.8.0.0-171.15.255.255
            array('-1236271104', '-1235419137'), //182.80.0.0-182.92.255.255
            array('-770113536', '-768606209'), //210.25.0.0-210.47.255.255
            array('-569376768', '-564133889'), //222.16.0.0-222.95.255.255
        );

        $rand_key = mt_rand(0, 14);

        $ip= long2ip(mt_rand($ip_long[$rand_key][0], $ip_long[$rand_key][1]));

        return $ip;

    }

    /**
     * 获取随机身份证号
     * @return string
     */
    private function get_rand_id_card()
    {

        $identity_card = '';
        //身份证起止年月 eg：1990年12月31日 mktime(0,0,0,12,31,1990)
        $year_start = mktime(0,0,0,1,1,1950);
        $year_end = mktime(0,0,0,12,31,1992);
        //全国区域代码 共3131
        $Region= array(
            110101,110102,110105,110106,110107,110108,110109,110111,110112,110113,110114,110115,
            110116,110117,110228,110229,120101,120102,120103,120104,120105,120106,120110,120111,
            120112,120113,120114,120115,120116,120221,120223,120225,130101,130102,130103,130104,
            130105,130107,130108,130121,130123,130124,130125,130126,130127,130128,130129,130130,
            130131,130132,130133,130181,130182,130183,130184,130185,130201,130202,130203,130204,
            130205,130207,130208,130209,130223,130224,130225,130227,130229,130281,130283,130301,
            130302,130303,130304,130321,130322,130323,130324,130401,130402,130403,130404,130406,
            130421,130423,130424,130425,130426,130427,130428,130429,130430,130431,130432,130433,
            130434,130435,130481,130501,130502,130503,130521,130522,130523,130524,130525,130526,
            130527,130528,130529,130530,130531,130532,130533,130534,130535,130581,130582,130601,
            130602,130603,130604,130621,130622,130623,130624,130625,130626,130627,130628,130629,
            130630,130631,130632,130633,130634,130635,130636,130637,130638,130681,130682,130683,
            130684,130701,130702,130703,130705,130706,130721,130722,130723,130724,130725,130726,
            130727,130728,130729,130730,130731,130732,130733,130801,130802,130803,130804,130821,
            130822,130823,130824,130825,130826,130827,130828,130901,130902,130903,130921,130922,
            130923,130924,130925,130926,130927,130928,130929,130930,130981,130982,130983,130984,
            131001,131002,131003,131022,131023,131024,131025,131026,131028,131081,131082,131101,
            131102,131121,131122,131123,131124,131125,131126,131127,131128,131181,131182,140101,
            140105,140106,140107,140108,140109,140110,140121,140122,140123,140181,140201,140202,
            140203,140211,140212,140221,140222,140223,140224,140225,140226,140227,140301,140302,
            140303,140311,140321,140322,140401,140402,140411,140421,140423,140424,140425,140426,
            140427,140428,140429,140430,140431,140481,140501,140502,140521,140522,140524,140525,
            140581,140601,140602,140603,140621,140622,140623,140624,140701,140702,140721,140722,
            140723,140724,140725,140726,140727,140728,140729,140781,140801,140802,140821,140822,
            140823,140824,140825,140826,140827,140828,140829,140830,140881,140882,140901,140902,
            140921,140922,140923,140924,140925,140926,140927,140928,140929,140930,140931,140932,
            140981,141001,141002,141021,141022,141023,141024,141025,141026,141027,141028,141029,
            141030,141031,141032,141033,141034,141081,141082,141101,141102,141121,141122,141123,
            141124,141125,141126,141127,141128,141129,141130,141181,141182,150101,150102,150103,
            150104,150105,150121,150122,150123,150124,150125,150201,150202,150203,150204,150205,
            150206,150207,150221,150222,150223,150301,150302,150303,150304,150401,150402,150403,
            150404,150421,150422,150423,150424,150425,150426,150428,150429,150430,150501,150502,
            150521,150522,150523,150524,150525,150526,150581,150601,150602,150621,150622,150623,
            150624,150625,150626,150627,150701,150702,150721,150722,150723,150724,150725,150726,
            150727,150781,150782,150783,150784,150785,150801,150802,150821,150822,150823,150824,
            150825,150826,150901,150902,150921,150922,150923,150924,150925,150926,150927,150928,
            150929,150981,152201,152202,152221,152222,152223,152224,152501,152502,152522,152523,
            152524,152525,152526,152527,152528,152529,152530,152531,152921,152922,152923,210101,
            210102,210103,210104,210105,210106,210111,210112,210113,210114,210122,210123,210124,
            210181,210201,210202,210203,210204,210211,210212,210213,210224,210281,210282,210283,
            210301,210302,210303,210304,210311,210321,210323,210381,210401,210402,210403,210404,
            210411,210421,210422,210423,210501,210502,210503,210504,210505,210521,210522,210601,
            210602,210603,210604,210624,210681,210682,210701,210702,210703,210711,210726,210727,
            210781,210782,210801,210802,210803,210804,210811,210881,210882,210901,210902,210903,
            210904,210905,210911,210921,210922,211001,211002,211003,211004,211005,211011,211021,
            211081,211101,211102,211103,211121,211122,211201,211202,211204,211221,211223,211224,
            211281,211282,211301,211302,211303,211321,211322,211324,211381,211382,211401,211402,
            211403,211404,211421,211422,211481,220101,220102,220103,220104,220105,220106,220112,
            220122,220181,220182,220183,220201,220202,220203,220204,220211,220221,220281,220282,
            220283,220284,220301,220302,220303,220322,220323,220381,220382,220401,220402,220403,
            220421,220422,220501,220502,220503,220521,220523,220524,220581,220582,220601,220602,
            220605,220621,220622,220623,220681,220701,220702,220721,220722,220723,220724,220801,
            220802,220821,220822,220881,220882,222401,222402,222403,222404,222405,222406,222424,
            222426,230101,230102,230103,230104,230108,230109,230110,230111,230112,230123,230124,
            230125,230126,230127,230128,230129,230182,230183,230184,230201,230202,230203,230204,
            230205,230206,230207,230208,230221,230223,230224,230225,230227,230229,230230,230231,
            230281,230301,230302,230303,230304,230305,230306,230307,230321,230381,230382,230401,
            230402,230403,230404,230405,230406,230407,230421,230422,230501,230502,230503,230505,
            230506,230521,230522,230523,230524,230601,230602,230603,230604,230605,230606,230621,
            230622,230623,230624,230701,230702,230703,230704,230705,230706,230707,230708,230709,
            230710,230711,230712,230713,230714,230715,230716,230722,230781,230801,230803,230804,
            230805,230811,230822,230826,230828,230833,230881,230882,230901,230902,230903,230904,
            230921,231001,231002,231003,231004,231005,231024,231025,231081,231083,231084,231085,
            231101,231102,231121,231123,231124,231181,231182,231201,231202,231221,231222,231223,
            231224,231225,231226,231281,231282,231283,232721,232722,232723,310101,310104,310105,
            310106,310107,310108,310109,310110,310112,310113,310114,310115,310116,310117,310118,
            310120,310230,320101,320102,320103,320104,320105,320106,320107,320111,320113,320114,
            320115,320116,320124,320125,320201,320202,320203,320204,320205,320206,320211,320281,
            320282,320301,320302,320303,320305,320311,320312,320321,320322,320324,320381,320382,
            320401,320402,320404,320405,320411,320412,320481,320482,320501,320505,320506,320507,
            320508,320509,320581,320582,320583,320585,320601,320602,320611,320612,320621,320623,
            320681,320682,320684,320701,320703,320705,320706,320721,320722,320723,320724,320801,
            320802,320803,320804,320811,320826,320829,320830,320831,320901,320902,320903,320921,
            320922,320923,320924,320925,320981,320982,321001,321002,321003,321012,321023,321081,
            321084,321101,321102,321111,321112,321181,321182,321183,321201,321202,321203,321281,
            321282,321283,321284,321301,321302,321311,321322,321323,321324,330101,330102,330103,
            330104,330105,330106,330108,330109,330110,330122,330127,330182,330183,330185,330201,
            330203,330204,330205,330206,330211,330212,330225,330226,330281,330282,330283,330301,
            330302,330303,330304,330322,330324,330326,330327,330328,330329,330381,330382,330401,
            330402,330411,330421,330424,330481,330482,330483,330501,330502,330503,330521,330522,
            330523,330601,330602,330621,330624,330681,330682,330683,330701,330702,330703,330723,
            330726,330727,330781,330782,330783,330784,330801,330802,330803,330822,330824,330825,
            330881,330901,330902,330903,330921,330922,331001,331002,331003,331004,331021,331022,
            331023,331024,331081,331082,331101,331102,331121,331122,331123,331124,331125,331126,
            331127,331181,340101,340102,340103,340104,340111,340121,340122,340123,340124,340181,
            340201,340202,340203,340207,340208,340221,340222,340223,340225,340301,340302,340303,
            340304,340311,340321,340322,340323,340401,340402,340403,340404,340405,340406,340421,
            340501,340503,340504,340506,340521,340522,340523,340601,340602,340603,340604,340621,
            340701,340702,340703,340711,340721,340801,340802,340803,340811,340822,340823,340824,
            340825,340826,340827,340828,340881,341001,341002,341003,341004,341021,341022,341023,
            341024,341101,341102,341103,341122,341124,341125,341126,341181,341182,341201,341202,
            341203,341204,341221,341222,341225,341226,341282,341301,341302,341321,341322,341323,
            341324,341501,341502,341503,341521,341522,341523,341524,341525,341601,341602,341621,
            341622,341623,341701,341702,341721,341722,341723,341801,341802,341821,341822,341823,
            341824,341825,341881,350101,350102,350103,350104,350105,350111,350121,350122,350123,
            350124,350125,350128,350181,350182,350201,350203,350205,350206,350211,350212,350213,
            350301,350302,350303,350304,350305,350322,350401,350402,350403,350421,350423,350424,
            350425,350426,350427,350428,350429,350430,350481,350501,350502,350503,350504,350505,
            350521,350524,350525,350526,350527,350581,350582,350583,350601,350602,350603,350622,
            350623,350624,350625,350626,350627,350628,350629,350681,350701,350702,350721,350722,
            350723,350724,350725,350781,350782,350783,350784,350801,350802,350821,350822,350823,
            350824,350825,350881,350901,350902,350921,350922,350923,350924,350925,350926,350981,
            350982,360101,360102,360103,360104,360105,360111,360121,360122,360123,360124,360201,
            360202,360203,360222,360281,360301,360302,360313,360321,360322,360323,360401,360402,
            360403,360421,360423,360424,360425,360426,360427,360428,360429,360430,360481,360482,
            360501,360502,360521,360601,360602,360622,360681,360701,360702,360721,360722,360723,
            360724,360725,360726,360727,360728,360729,360730,360731,360732,360733,360734,360735,
            360781,360782,360801,360802,360803,360821,360822,360823,360824,360825,360826,360827,
            360828,360829,360830,360881,360901,360902,360921,360922,360923,360924,360925,360926,
            360981,360982,360983,361001,361002,361021,361022,361023,361024,361025,361026,361027,
            361028,361029,361030,361101,361102,361121,361122,361123,361124,361125,361126,361127,
            361128,361129,361130,361181,370101,370102,370103,370104,370105,370112,370113,370124,
            370125,370126,370181,370201,370202,370203,370205,370211,370212,370213,370214,370281,
            370282,370283,370284,370285,370301,370302,370303,370304,370305,370306,370321,370322,
            370323,370401,370402,370403,370404,370405,370406,370481,370501,370502,370503,370521,
            370522,370523,370601,370602,370611,370612,370613,370634,370681,370682,370683,370684,
            370685,370686,370687,370701,370702,370703,370704,370705,370724,370725,370781,370782,
            370783,370784,370785,370786,370801,370802,370811,370826,370827,370828,370829,370830,
            370831,370832,370881,370882,370883,370901,370902,370911,370921,370923,370982,370983,
            371001,371002,371081,371082,371083,371101,371102,371103,371121,371122,371201,371202,
            371203,371301,371302,371311,371312,371321,371322,371323,371324,371325,371326,371327,
            371328,371329,371401,371402,371421,371422,371423,371424,371425,371426,371427,371428,
            371481,371482,371501,371502,371521,371522,371523,371524,371525,371526,371581,371601,
            371602,371621,371622,371623,371624,371625,371626,371701,371702,371721,371722,371723,
            371724,371725,371726,371727,371728,410101,410102,410103,410104,410105,410106,410108,
            410122,410181,410182,410183,410184,410185,410201,410202,410203,410204,410205,410211,
            410221,410222,410223,410224,410225,410301,410302,410303,410304,410305,410306,410311,
            410322,410323,410324,410325,410326,410327,410328,410329,410381,410401,410402,410403,
            410404,410411,410421,410422,410423,410425,410481,410482,410501,410502,410503,410505,
            410506,410522,410523,410526,410527,410581,410601,410602,410603,410611,410621,410622,
            410701,410702,410703,410704,410711,410721,410724,410725,410726,410727,410728,410781,
            410782,410801,410802,410803,410804,410811,410821,410822,410823,410825,410882,410883,
            410901,410902,410922,410923,410926,410927,410928,411001,411002,411023,411024,411025,
            411081,411082,411101,411102,411103,411104,411121,411122,411201,411202,411221,411222,
            411224,411281,411282,411301,411302,411303,411321,411322,411323,411324,411325,411326,
            411327,411328,411329,411330,411381,411401,411402,411403,411421,411422,411423,411424,
            411425,411426,411481,411501,411502,411503,411521,411522,411523,411524,411525,411526,
            411527,411528,411601,411602,411621,411622,411623,411624,411625,411626,411627,411628,
            411681,411701,411702,411721,411722,411723,411724,411725,411726,411727,411728,411729,
            419001,420101,420102,420103,420104,420105,420106,420107,420111,420112,420113,420114,
            420115,420116,420117,420201,420202,420203,420204,420205,420222,420281,420301,420302,
            420303,420321,420322,420323,420324,420325,420381,420501,420502,420503,420504,420505,
            420506,420525,420526,420527,420528,420529,420581,420582,420583,420601,420602,420606,
            420607,420624,420625,420626,420682,420683,420684,420701,420702,420703,420704,420801,
            420802,420804,420821,420822,420881,420901,420902,420921,420922,420923,420981,420982,
            420984,421001,421002,421003,421022,421023,421024,421081,421083,421087,421101,421102,
            421121,421122,421123,421124,421125,421126,421127,421181,421182,421201,421202,421221,
            421222,421223,421224,421281,421301,421303,421321,421381,422801,422802,422822,422823,
            422825,422826,422827,422828,429004,429005,429006,429021,430101,430102,430103,430104,
            430105,430111,430112,430121,430124,430181,430201,430202,430203,430204,430211,430221,
            430223,430224,430225,430281,430301,430302,430304,430321,430381,430382,430401,430405,
            430406,430407,430408,430412,430421,430422,430423,430424,430426,430481,430482,430501,
            430502,430503,430511,430521,430522,430523,430524,430525,430527,430528,430529,430581,
            430601,430602,430603,430611,430621,430623,430624,430626,430681,430682,430701,430702,
            430703,430721,430722,430723,430724,430725,430726,430781,430801,430802,430811,430821,
            430822,430901,430902,430903,430921,430922,430923,430981,431001,431002,431003,431021,
            431022,431023,431024,431025,431026,431027,431028,431081,431101,431102,431103,431121,
            431122,431123,431124,431125,431126,431127,431128,431129,431201,431202,431221,431222,
            431223,431224,431225,431226,431227,431228,431229,431230,431281,431301,431302,431321,
            431322,431381,431382,433101,433122,433123,433124,433125,433126,433127,433130,440101,
            440103,440104,440105,440106,440111,440112,440113,440114,440115,440116,440183,440184,
            440201,440203,440204,440205,440222,440224,440229,440232,440233,440281,440282,440301,
            440303,440304,440305,440306,440307,440308,440401,440402,440403,440404,440501,440507,
            440511,440512,440513,440514,440515,440523,440601,440604,440605,440606,440607,440608,
            440701,440703,440704,440705,440781,440783,440784,440785,440801,440802,440803,440804,
            440811,440823,440825,440881,440882,440883,440901,440902,440903,440923,440981,440982,
            440983,441201,441202,441203,441223,441224,441225,441226,441283,441284,441301,441302,
            441303,441322,441323,441324,441401,441402,441421,441422,441423,441424,441426,441427,
            441481,441501,441502,441521,441523,441581,441601,441602,441621,441622,441623,441624,
            441625,441701,441702,441721,441723,441781,441801,441802,441821,441823,441825,441826,
            441827,441881,441882,445101,445102,445121,445122,445201,445202,445221,445222,445224,
            445281,445301,445302,445321,445322,445323,445381,450101,450102,450103,450105,450107,
            450108,450109,450122,450123,450124,450125,450126,450127,450201,450202,450203,450204,
            450205,450221,450222,450223,450224,450225,450226,450301,450302,450303,450304,450305,
            450311,450321,450322,450323,450324,450325,450326,450327,450328,450329,450330,450331,
            450332,450401,450403,450404,450405,450421,450422,450423,450481,450501,450502,450503,
            450512,450521,450601,450602,450603,450621,450681,450701,450702,450703,450721,450722,
            450801,450802,450803,450804,450821,450881,450901,450902,450921,450922,450923,450924,
            450981,451001,451002,451021,451022,451023,451024,451025,451026,451027,451028,451029,
            451030,451031,451101,451102,451121,451122,451123,451201,451202,451221,451222,451223,
            451224,451225,451226,451227,451228,451229,451281,451301,451302,451321,451322,451323,
            451324,451381,451401,451402,451421,451422,451423,451424,451425,451481,460101,460105,
            460106,460107,460108,460201,460321,460322,460323,469001,469002,469003,469005,469006,
            469007,469021,469022,469023,469024,469025,469026,469027,469028,469029,469030,500101,
            500102,500103,500104,500105,500106,500107,500108,500109,500110,500111,500112,500113,
            500114,500115,500116,500117,500118,500119,500223,500224,500226,500227,500228,500229,
            500230,500231,500232,500233,500234,500235,500236,500237,500238,500240,500241,500242,
            500243,510101,510104,510105,510106,510107,510108,510112,510113,510114,510115,510121,
            510122,510124,510129,510131,510132,510181,510182,510183,510184,510301,510302,510303,
            510304,510311,510321,510322,510401,510402,510403,510411,510421,510422,510501,510502,
            510503,510504,510521,510522,510524,510525,510601,510603,510623,510626,510681,510682,
            510683,510701,510703,510704,510722,510723,510724,510725,510726,510727,510781,510801,
            510802,510811,510812,510821,510822,510823,510824,510901,510903,510904,510921,510922,
            510923,511001,511002,511011,511024,511025,511028,511101,511102,511111,511112,511113,
            511123,511124,511126,511129,511132,511133,511181,511301,511302,511303,511304,511321,
            511322,511323,511324,511325,511381,511401,511402,511421,511422,511423,511424,511425,
            511501,511502,511503,511521,511523,511524,511525,511526,511527,511528,511529,511601,
            511602,511621,511622,511623,511681,511701,511702,511721,511722,511723,511724,511725,
            511781,511801,511802,511803,511822,511823,511824,511825,511826,511827,511901,511902,
            511921,511922,511923,512001,512002,512021,512022,512081,513221,513222,513223,513224,
            513225,513226,513227,513228,513229,513230,513231,513232,513233,513321,513322,513323,
            513324,513325,513326,513327,513328,513329,513330,513331,513332,513333,513334,513335,
            513336,513337,513338,513401,513422,513423,513424,513425,513426,513427,513428,513429,
            513430,513431,513432,513433,513434,513435,513436,513437,520101,520102,520103,520111,
            520112,520113,520114,520121,520122,520123,520181,520201,520203,520221,520222,520301,
            520302,520303,520321,520322,520323,520324,520325,520326,520327,520328,520329,520330,
            520381,520382,520401,520402,520421,520422,520423,520424,520425,520502,520521,520522,
            520523,520524,520525,520526,520527,520602,520603,520621,520622,520623,520624,520625,
            520626,520627,520628,522301,522322,522323,522324,522325,522326,522327,522328,522601,
            522622,522623,522624,522625,522626,522627,522628,522629,522630,522631,522632,522633,
            522634,522635,522636,522701,522702,522722,522723,522725,522726,522727,522728,522729,
            522730,522731,522732,530101,530102,530103,530111,530112,530113,530114,530122,530124,
            530125,530126,530127,530128,530129,530181,530301,530302,530321,530322,530323,530324,
            530325,530326,530328,530381,530402,530421,530422,530423,530424,530425,530426,530427,
            530428,530501,530502,530521,530522,530523,530524,530601,530602,530621,530622,530623,
            530624,530625,530626,530627,530628,530629,530630,530701,530702,530721,530722,530723,
            530724,530801,530802,530821,530822,530823,530824,530825,530826,530827,530828,530829,
            530901,530902,530921,530922,530923,530924,530925,530926,530927,532301,532322,532323,
            532324,532325,532326,532327,532328,532329,532331,532501,532502,532503,532523,532524,
            532525,532526,532527,532528,532529,532530,532531,532532,532601,532622,532623,532624,
            532625,532626,532627,532628,532801,532822,532823,532901,532922,532923,532924,532925,
            532926,532927,532928,532929,532930,532931,532932,533102,533103,533122,533123,533124,
            533321,533323,533324,533325,533421,533422,533423,540101,540102,540121,540122,540123,
            540124,540125,540126,540127,542121,542122,542123,542124,542125,542126,542127,542128,
            542129,542132,542133,542221,542222,542223,542224,542225,542226,542227,542228,542229,
            542231,542232,542233,542301,542322,542323,542324,542325,542326,542327,542328,542329,
            542330,542331,542332,542333,542334,542335,542336,542337,542338,542421,542422,542423,
            542424,542425,542426,542427,542428,542429,542430,542521,542522,542523,542524,542525,
            542526,542527,542621,542622,542623,542624,542625,542626,542627,610101,610102,610103,
            610104,610111,610112,610113,610114,610115,610116,610122,610124,610125,610126,610201,
            610202,610203,610204,610222,610301,610302,610303,610304,610322,610323,610324,610326,
            610327,610328,610329,610330,610331,610401,610402,610403,610404,610422,610423,610424,
            610425,610426,610427,610428,610429,610430,610431,610481,610501,610502,610521,610522,
            610523,610524,610525,610526,610527,610528,610581,610582,610601,610602,610621,610622,
            610623,610624,610625,610626,610627,610628,610629,610630,610631,610632,610701,610702,
            610721,610722,610723,610724,610725,610726,610727,610728,610729,610730,610801,610802,
            610821,610822,610823,610824,610825,610826,610827,610828,610829,610830,610831,610901,
            610902,610921,610922,610923,610924,610925,610926,610927,610928,610929,611001,611002,
            611021,611022,611023,611024,611025,611026,620101,620102,620103,620104,620105,620111,
            620121,620122,620123,620201,620301,620302,620321,620401,620402,620403,620421,620422,
            620423,620501,620502,620503,620521,620522,620523,620524,620525,620601,620602,620621,
            620622,620623,620701,620702,620721,620722,620723,620724,620725,620801,620802,620821,
            620822,620823,620824,620825,620826,620901,620902,620921,620922,620923,620924,620981,
            620982,621001,621002,621021,621022,621023,621024,621025,621026,621027,621101,621102,
            621121,621122,621123,621124,621125,621126,621201,621202,621221,621222,621223,621224,
            621225,621226,621227,621228,622901,622921,622922,622923,622924,622925,622926,622927,
            623001,623021,623022,623023,623024,623025,623026,623027,630101,630102,630103,630104,
            630105,630121,630122,630123,632121,632122,632123,632126,632127,632128,632221,632222,
            632223,632224,632321,632322,632323,632324,632521,632522,632523,632524,632525,632621,
            632622,632623,632624,632625,632626,632721,632722,632723,632724,632725,632726,632801,
            632802,632821,632822,632823,640101,640104,640105,640106,640121,640122,640181,640201,
            640202,640205,640221,640301,640302,640303,640323,640324,640381,640401,640402,640422,
            640423,640424,640425,640501,640502,640521,640522,650101,650102,650103,650104,650105,
            650106,650107,650109,650121,650201,650202,650203,650204,650205,652101,652122,652123,
            652201,652222,652223,652301,652302,652323,652324,652325,652327,652328,652701,652722,
            652723,652801,652822,652823,652824,652825,652826,652827,652828,652829,652901,652922,
            652923,652924,652925,652926,652927,652928,652929,653001,653022,653023,653024,653101,
            653121,653122,653123,653124,653125,653126,653127,653128,653129,653130,653131,653201,
            653221,653222,653223,653224,653225,653226,653227,654002,654003,654021,654022,654023,
            654024,654025,654026,654027,654028,654201,654202,654221,654223,654224,654225,654226,
            654301,654321,654322,654323,654324,654325,654326,659001,659002,659003,659004);

        function calc_suffix_d ($base){
            if (strlen($base) <> 17){
                die('Invalid Length');
            }
            $factor = array(7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2);
            $sums = 0;
            for ($i=0;$i< 17;$i++){

                $sums += substr($base,$i,1) * $factor[$i];
            }

            $mods = $sums % 11;//10X98765432

            switch ($mods){
                case 0: return '1';break;
                case 1: return '0';break;
                case 2: return 'x';break;
                case 3: return '9';break;
                case 4: return '8';break;
                case 5: return '7';break;
                case 6: return '6';break;
                case 7: return '5';break;
                case 8: return '4';break;
                case 9: return '3';break;
                case 10: return '2';break;

            }

        }

        $seed  = mt_rand(0,3130);//total of region code
        $birth = mt_rand($year_start,$year_end);
        $birth_format = date('Ymd',$birth);
        $suffix_a = mt_rand(0,9);
        $suffix_b = mt_rand(0,9);
        $suffix_c = mt_rand(0,9);//male or female

        $base = $Region[$seed].$birth_format.$suffix_a.$suffix_b.$suffix_c;

        $identity_card .= $base.calc_suffix_d($base);

        return $identity_card;

    }
    public function address(){
        $city = [ '北京', '上海', '天津', '重庆',
            '哈尔滨', '长春', '沈阳', '呼和浩特',
            '石家庄', '乌鲁木齐', '兰州', '西宁',
            '西安', '银川', '郑州', '济南',
            '太原', '合肥', '武汉', '长沙',
            '南京', '成都', '贵阳', '昆明',
            '南宁', '拉萨', '杭州', '南昌',
            '广州', '福州', '海口',
            '香港', '澳门'];
        $area = [
            '西夏区', '永川区', '秀英区', '高港区',
            '清城区', '兴山区', '锡山区', '清河区',
            '龙潭区', '华龙区', '海陵区', '滨城区',
            '东丽区', '高坪区', '沙湾区', '平山区',
            '城北区', '海港区', '沙市区', '双滦区',
            '长寿区', '山亭区', '南湖区', '浔阳区',
            '南长区', '友好区', '安次区', '翔安区',
            '沈河区', '魏都区', '西峰区', '萧山区',
            '金平区', '沈北新区', '孝南区', '上街区',
            '城东区', '牧野区', '大东区', '白云区',
            '花溪区', '吉利区', '新城区', '怀柔区',
            '六枝特区', '涪城区', '清浦区', '南溪区',
            '淄川区', '高明区', '金水区', '中原区',
            '高新开发区', '经济开发新区', '新区'
        ];
       $key1 = array_rand($city, 1);
        $key2 = array_rand($area, 1);
        return $city[$key1].$area[$key2];
    }

    /**
     * @return mixed
     */
    public function company()
    {
        $arr1 = ['超艺', '和泰', '九方', '鑫博腾飞', '戴硕电子',
            '济南亿次元', '海创', '创联世纪', '凌云', '泰麒麟',
            '彩虹', '兰金电子', '晖来计算机', '天益', '恒聪百汇',
            '菊风公司', '惠派国际公司', '创汇', '思优', '时空盒数字',
            '易动力', '飞海科技', '华泰通安', '盟新', '商软冠联',
            '图龙信息', '易动力', '华远软件', '创亿', '时刻',
            '开发区世创', '明腾', '良诺', '天开', '毕博诚', '快讯',
            '凌颖信息', '黄石金承', '恩悌', '雨林木风计算机',
            '双敏电子', '维旺明', '网新恒天', '数字100', '飞利信',
            '立信电子', '联通时科', '中建创业', '新格林耐特',
            '新宇龙信息', '浙大万朋', 'MBP软件', '昂歌信息',
            '万迅电脑', '方正科技', '联软', '七喜', '南康', '银嘉',
            '巨奥', '佳禾', '国讯', '信诚致远', '浦华众城', '迪摩',
            '太极', '群英', '合联电子', '同兴万点', '襄樊地球村',
            '精芯', '艾提科信', '昊嘉', '鸿睿思博', '四通', '富罳',
            '商软冠联', '诺依曼软件', '东方峻景', '华成育卓', '趋势',
            '维涛', '通际名联'];
        $type = ['科技', '网络', '信息', '传媒'];
        $ext= '有限公司';
        $key1 = array_rand($arr1, 1);
        $key2 = array_rand($type, 1);
        return $arr1[$key1].$type[$key2].$ext;
    }

    /**
     * @return mixed
     */
    public function ad()
    {
        $a = [  '燕舞，燕舞，一曲歌来一片情。',
            '康师傅方便面，好吃看得见。',
            '不要太潇洒！',
            '让一亿人先聪明起来。',
            '共创美的前程，共度美的人生。',
            '省优，部优，葛优？',
            '喝孔府宴酒，做天下文章。',
            '健康成就未来。',
            '牙好，胃口就好，身体倍儿棒，吃嘛嘛香。',
            '永远的绿色，永远的秦池。',
            '坐红旗车，走中国路。',
            '要想皮肤好，早晚用大宝。',
            '孔府家酒，叫人想家。',
            '补钙新观念，吸收是要害。',
            '喝汇源果汁，走健康之路。',
            '爱的就是你!',
            '一种可以世袭的古典浪漫',
            '实力创造价值',
            '爱生活，爱拉芳！',
            '人类失去联想，世界将会怎样？',
            '做女人挺好！',
            '世界在你眼中？',
            '今天你有否亿唐？',
            '只溶在口，不溶在手。',
            '三千烦恼丝，健康新开始。',
            '维维豆奶，欢乐开怀。',
            '我们的光彩来自你的风采。',
            '钻石恒久远，一颗永流传。',
            '放我的真心在你的手心。',
            '小身材，大味道。',
            '牛奶香浓，丝般感受。',
            '聆听并不代表沉默，有时安静也是一种力量。',
            '滴滴香浓，意犹未尽。',
            '水晶之恋，一生不变。',
            '中国移动通信，沟通从心开始！',
            '网易，网聚人的力量！',
            '科技以人为本，诺基亚',
            '我们一直在努力！',
            '阳光总在风雨后',
            '男人对西服的要求，就是女人对男人的要求',
            '晚报，不晚报',
            '原来生活可以更美的',
            '明天的明天，你还会送我“水晶之恋”吗？',
            '卫浴出出进进的快感',
            '有家就有联合利华',
            '减脂减肥，其实是一种生活态度',
            '人头马一开，好事自然来。',
            '假如五指一样长，怎能满足用户不同需求？',
            '新飞广告做的好，不好新飞冰箱好',
            '传奇品质，百年张裕',
            '李宁：把出色留给自己',
            '一旦拥有，别无选择',
            '科技让你更轻松',
            '情系中国结，联通四海心',
            '海尔，中国造',
            'SOHU：足迹生活每一天',
            '果冻我要喜之郎',
            '国宝大熊猫，心纯天自高',
            '世界因为不同',
            '放低偏见，你会有出色发现！',
            'Just',
            '创意似金，敬业如牛',
            '不要让男人一手把握',
            '如同情人的手',
            '金窝银窝，不如自己的安乐窝。',
            '没有什么大不了的',
            '时间因我存在',
            '只要有梦想',
            '南方周末',
            '时间改变一切',
            '地球人都知道了',
            '众里寻他千百度，想要几度就几度',
            '您身边的银行，可信赖的银行',
            '三叶钢琴：学琴的孩子不会变坏',
            '柯达：串起生活每一刻',
            '大众甲克虫汽车：想想还是小的好',
            '一直被模拟,从未被超越',
            '幸福生活',
            '朗讯的创造力科技的原动力',
            '事事因你而出色',
            '运动之美，世界共享',
            '鹤舞白沙',
            '想知道“清嘴”的味道吗？',
            '弹指一挥间，世界皆互联',
            '更多选择、更多欢笑',
            '方太，让家的感觉更好',
            '世上仅此一件，今生与你结缘！',
            '白里透红与众不同',
            '没有蛀牙-佳洁士',
            '有线的价值',
            '享受快乐科技',
            '四海一家的解决之道',
            '娃哈哈纯净水：爱你等于爱自己',
            '农民山泉：有点甜',
            '博大精深，西门子',
            '一切尽在把握',
            '声声百思特，遥遥两相知',
            '一呼天下应',
            '让我们做得更好！',
            '暖和亲情，金龙鱼的大家庭。',
            '自然最健康，绿色好心情',
            '支起网络世界',
            '立邦漆：处处放光彩！',
            'fm365:真情互动！',
            '庄重一生，吉祥一生。',
            '人人都为礼品愁，我送北极海狗油。',
            '假如说人生的离合是一场戏，那么百年的好合更是早有安排！',
            '一品黄山天高云淡',
            '上上下下的享受！',
            '我是、我行、我素',
            '让无力者有力，让悲观者前行',
            '金利来—-男人的世界！',
            '百衣百顺',
            '聪明何必绝顶，慧根长留',
            '水往高处流',
            '大石化小，小石化了！',
            '“闲”妻良母',
            '“口服”，“心服”！',
            '盛满青春的秘密！',
            '三十六计走为上',
            '为了她的节日，献上您纯金般的心！',
            '用我们的钓线，你可以在鱼儿发现你之前先找到它',
            '生活就是一场运动，喝下它。',
            '选择维聚阿尔，已经表明你心明眼亮。',
            '佳能，我们看得见你想表达什么。',
            '天天都是春天',
            '假如你不来，广告明星就是他',
            '享受黑夜中偷拍的快感！',
            '彩信发送动人一刻',
            '灵感点亮生活!',
            '聪明演绎，无处不在！',
            '事业我一定争取，对你我从未放弃!',
            '波导手机，手机中的战斗机',
            '鄂尔多斯羊绒衫暖和全世界',
            '洁婷245再大的动作也不要紧',
            '做光明的牛，产光明的奶',
            '假如你的汽车会游泳的话，请照直开，不必刹车。',
            '永远要让驾驶执照比你自己先到期。',
            '请记住，上帝并不是十全十美的，它给汽车预备了备件，而人没有。',
            '小别意酸酸，欢聚心甜甜。',
            '除钞票外，承印一切。',
            '更多欢乐，更多选择',
            '美由你做主',
            '由我天地宽',
            'Sun是太阳，Java是月亮。',
            '不断创新，因为专心',
            '趁早下『斑』，请勿『痘』留。',
            '请不要同刚刚走出本院的女人调情，她或许就是你的外祖母。',
            '创新就是生活',
            '有一个漂亮的地方，万科四季花城',
            '建筑无限生活',
            '臭名远扬，香飘万里',
            '尝尝欢笑，经常麦当劳',
            '深入成就深度',
            '出色湖南，红网了然！',
            '因为网络，地球如村！',
            '一种质感',
            '恒久期盼',
            '繁荣民族文化',
            '不信，死给你看！',
            '天生的，强生的',
            '雪津啤酒，真情的味道！',
            '听世界，打天下',
            '雅芳比女人更了解女人',
            'Sun是太阳，Java是月亮。',
            '中国网通',
            '无线你的无限',
            '家有三洋，冬暖夏凉',
            '倾诉冬日暖语',
            '谁让我心动？',
            '灵活，让篮球场不再是一个平面',
            '别吻我，我怕修。',
            '一呼四应！',
            '无所不包！',
            '当之无愧',
            '以帽取人！',
            '一毛不拔！',
            '自讨苦吃！',
            '成功与科技共辉映'];
        $k = array_rand($a, 1);
        return $a[$k];
    }

    /**
     * @return mixed
     */
    public function emoji()
    {
        $emoji = array(
            '\uD83D\uDE00', '\uD83D\uDE01', '\uD83D\uDE02', '\uD83D\uDE03',
            '\uD83D\uDE04', '\uD83D\uDE05', '\uD83D\uDE06', '\uD83D\uDE07',
            '\uD83D\uDE08', '\uD83D\uDE09', '\uD83D\uDE0A', '\uD83D\uDE0B',
            '\uD83D\uDE0C', '\uD83D\uDE0D', '\uD83D\uDE0E', '\uD83D\uDE0F',
            '\uD83D\uDE10', '\uD83D\uDE11', '\uD83D\uDE12', '\uD83D\uDE13',
            '\uD83D\uDE14', '\uD83D\uDE15', '\uD83D\uDE16', '\uD83D\uDE17',
            '\uD83D\uDE18', '\uD83D\uDE19', '\uD83D\uDE1A', '\uD83D\uDE1B',
            '\uD83D\uDE1C', '\uD83D\uDE1D', '\uD83D\uDE1E', '\uD83D\uDE1F',
            '\uD83D\uDE20', '\uD83D\uDE21', '\uD83D\uDE22', '\uD83D\uDE23',
            '\uD83D\uDE24', '\uD83D\uDE25', '\uD83D\uDE26', '\uD83D\uDE27',
            '\uD83D\uDE28', '\uD83D\uDE29', '\uD83D\uDE2A', '\uD83D\uDE2B',
            '\uD83D\uDE2C', '\uD83D\uDE2D', '\uD83D\uDE2E', '\uD83D\uDE2F',
            '\uD83D\uDE30', '\uD83D\uDE31', '\uD83D\uDE32', '\uD83D\uDE33',
            '\uD83D\uDE34', '\uD83D\uDE35', '\uD83D\uDE36', '\uD83D\uDE37',
        );
        $k = array_rand($emoji, 1);
        return json_decode('"' . $emoji[$k] . '"');
    }
    public function md5()
    {
        return md5(mt_rand());
    }

    /**
     * @example 'b5d86317c2a144cd04d0d7c03b2b02666fafadf2'
     */
    public function sha1()
    {
        return sha1(mt_rand());
    }
    /**
     * @return mixed
     */
    public function title()
    {
        return $this->ad();
    }
    public function uuid()
    {
        // fix for compatibility with 32bit architecture; seed range restricted to 62bit
        $seed = mt_rand(0, 2147483647) . '#' . mt_rand(0, 2147483647);

        // Hash the seed and convert to a byte array
        $val = md5($seed, true);
        $byte = array_values(unpack('C16', $val));

        // extract fields from byte array
        $tLo = ($byte[0] << 24) | ($byte[1] << 16) | ($byte[2] << 8) | $byte[3];
        $tMi = ($byte[4] << 8) | $byte[5];
        $tHi = ($byte[6] << 8) | $byte[7];
        $csLo = $byte[9];
        $csHi = $byte[8] & 0x3f | (1 << 7);

        // correct byte order for big edian architecture
        if (pack('L', 0x6162797A) == pack('N', 0x6162797A)) {
            $tLo = (($tLo & 0x000000ff) << 24) | (($tLo & 0x0000ff00) << 8)
                | (($tLo & 0x00ff0000) >> 8) | (($tLo & 0xff000000) >> 24);
            $tMi = (($tMi & 0x00ff) << 8) | (($tMi & 0xff00) >> 8);
            $tHi = (($tHi & 0x00ff) << 8) | (($tHi & 0xff00) >> 8);
        }

        // apply version number
        $tHi &= 0x0fff;
        $tHi |= (3 << 12);

        // cast to string
        $uuid = sprintf(
            '%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x',
            $tLo,
            $tMi,
            $tHi,
            $csHi,
            $csLo,
            $byte[10],
            $byte[11],
            $byte[12],
            $byte[13],
            $byte[14],
            $byte[15]
        );

        return $uuid;
    }

}